﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace Fabao.Shared.WebApi.Fliters
{
    public class MvcExceptionFilterAttribute : ExceptionFilterAttribute
    {
       
        public override void OnException(ExceptionContext context)
        {
            Exception ex = context.Exception;
            //if (ex != null) 
            //{
            //    string req_string = context.HttpContext.Request.Content?.ReadAsStringAsync()?.Result;
            //}
            int StatusCode = context.HttpContext.Response.StatusCode;
            //Log.WriteLogToTxt($"系统错误({StatusCode})：" + ex, LogType.Error);
            base.OnException(context);
        }
    }
}
